5 // Created by Evan Schoenberg on 3/4/06.
8 #import "ESIRCService.h"
9 #import "ESIRCAccount.h"
10 #import "ESIRCAccountViewController.h"
11 #import "ESIRCJoinChatViewController.h"
12 #import <AIUtilities/AIImageAdditions.h>
14 @implementation ESIRCService
16 - (Class)accountClass{
17 return [ESIRCAccount class];
20 - (AIAccountViewController *)accountViewController{
21 return [ESIRCAccountViewController accountViewController];
24 - (DCJoinChatViewController *)joinChatView{
25 return [ESIRCJoinChatViewController joinChatView];
29 - (NSString *)serviceCodeUniqueID{
30 return @"libpurple-IRC";
32 - (NSString *)serviceID{
35 - (NSString *)serviceClass{
38 - (NSString *)shortDescription{
41 - (NSString *)longDescription{
42 return @"IRC (Internet Relay Chat)";
44 - (NSCharacterSet *)allowedCharacters{
45 return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._- "];
47 - (NSCharacterSet *)ignoredCharacters{
48 return [NSCharacterSet characterSetWithCharactersInString:@""];
50 - (BOOL)caseSensitive{
53 - (BOOL)canCreateGroupChats{
56 //Passwords are optional - XXX right now this means we totally ignore the password field
57 - (BOOL)requiresPassword
61 - (AIServiceImportance)serviceImportance{
62 return AIServiceSecondary;
65 * @brief Placeholder string for the UID field
67 - (NSString *)UIDPlaceholder
69 return AILocalizedString(@"username@irc.server.com","Sample name and server for new IRC accounts");
75 * Service Icon packs should always include images for all the built-in Adium services. This method allows external
76 * service plugins to specify an image which will be used when the service icon pack does not specify one. It will
77 * also be useful if new services are added to Adium itself after a significant number of Service Icon packs exist
78 * which do not yet have an image for this service. If the active Service Icon pack provides an image for this service,
79 * this method will not be called.
81 * The service should _not_ cache this icon internally; multiple calls should return unique NSImage objects.
83 * @param iconType The AIServiceIconType of the icon to return. This specifies the desired size of the icon.
84 * @return NSImage to use for this service by default
86 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType
88 NSImage *baseImage = [NSImage imageNamed:@"irc" forClass:[self class]];
90 if (iconType == AIServiceIconSmall) {
91 baseImage = [baseImage imageByScalingToSize:NSMakeSize(16, 16)];